//
//  AInviteManCell.m
//  DistributorAB
//
//  Created by 主事丫环 on 2019/7/9.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "AInviteManCell.h"

@implementation AInviteManCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


-(void)refash:(AinvitivePersonModel *)model {

    [self.headerIV sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:defaultImg];
    self.shopNameL.text = [NSString stringWithFormat:@"%@",model.person?model.person:@""];
    if (model.power_time.length>0) {
        self.joinTimeL.text = [NSString stringWithFormat:@"%@加入",[model.power_time substringToIndex:10]];
    }else
    {
        self.joinTimeL.text = @"加入";
    }
    
    self.addressDetailL.text = [NSString stringWithFormat:@"%@",model.address?model.address:@""];
    self.areaL.text = [NSString stringWithFormat:@"%@",model.belong_area?model.belong_area:@""];
    self.phone = [NSString stringWithFormat:@"%@",model.phone?model.phone:@""];
    
    if ([model.is_power isEqualToString:@"0"]) { //未交费的
        self.typeImage.image = [UIImage imageNamed:@"weikaitong"];
    } else if ([model.is_power isEqualToString:@"1"]){ //已缴费的
        self.typeImage.image = [UIImage imageNamed:@"yikaitong"];
    }
    
}

- (IBAction)call:(id)sender {
    
    [HFTools callMobilePhone:self.phone];
    
}


@end
